package com.jt.tenant.adapter;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.jt.tenant.R;
import com.jt.tenant.app.JTApplication;
import com.jt.tenant.conn.GetFaultList;

import java.util.List;

/**
 * Created by Administrator on 2016/2/16.
 */
public class ConductAdapter extends BaseAdapter {

    private LayoutInflater layoutInflater;

    public ConductAdapter(Context context, List<GetFaultList.Info> list) {

        layoutInflater = ((Activity) context).getLayoutInflater();


    }

    @Override
    public int getCount() {

        return 4;

    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        ViewHolder holder = null;

        if (convertView == null) {

            convertView = JTApplication.ScaleScreenHelper.loadView((ViewGroup) layoutInflater.inflate(R.layout.item_conduct, null));

            holder = new ViewHolder();

//            holder.item_fault_name = (TextView) convertView.findViewById(R.id.item_fault_name);

            convertView.setTag(holder);

        } else {

            holder = (ViewHolder) convertView.getTag();

        }


        return convertView;

    }

    private class ViewHolder {

        private TextView item_fault_name;
    }

}
